package at.fhj.mobsecdev.cookit.util;

import at.fhj.mobsecdev.cookit.R;
import android.app.ProgressDialog;
import android.content.Context;
import android.graphics.drawable.Drawable;

/**
 * Indicator that displays loading dialog
 */
public class LoadingIndicator {

	private ProgressDialog dialog;
	private Drawable icon;
	
	public LoadingIndicator(Context context) {
		dialog = new ProgressDialog(context);
		icon = context.getResources().getDrawable(R.drawable.ic_launcher);
	}
	
	public ProgressDialog createIndicator() {
		dialog.setIndeterminateDrawable(icon);
        dialog.setMessage(dialog.getContext().getResources().getString(R.string.loading));
        return dialog;
	}
	
}
